package com.nikhu.fx.bom;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "exchange_rate")
public class ExchangeRate {

	public ExchangeRate() {

	}

	public ExchangeRate(String symbol, String baseCurrency, double rate,
			Date lastUpdated) {
		super();
		this.symbol = symbol;
		this.baseCurrency = baseCurrency;
		this.rate = rate;
		this.lastUpdated = lastUpdated;
	}

	@Id
	private String symbol;
	@Column(name = "base_currency")
	private String baseCurrency;
	private double rate;
	@Column(name = "last_updated")
	private Date lastUpdated;

	public String getSymbol() {
		return symbol;
	}

	public void setSymbol(String symbol) {
		this.symbol = symbol;
	}

	public String getBaseCurrency() {
		return baseCurrency;
	}

	public void setBaseCurrency(String baseCurrency) {
		this.baseCurrency = baseCurrency;
	}

	public double getRate() {
		return rate;
	}

	public void setRate(double rate) {
		this.rate = rate;
	}

	public Date getLastUpdated() {
		return lastUpdated;
	}

	public void setLastUpdated(Date lastUpdated) {
		this.lastUpdated = lastUpdated;
	}

}
